/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SWANLINK_FINANCE_INNERKITS_ICCREADER_ADAPTOR_H_
#define SWANLINK_FINANCE_INNERKITS_ICCREADER_ADAPTOR_H_

#include <string>
#include "iccreader_def.h"
#include "iadaptor.h"

namespace SwanLink {
namespace Finance {

class IccReaderAdaptor : public IAdaptor {
 public:
    /**
     * 获取设备信息
     */
    virtual int GetDeviceInfo(DeviceInfo &devInfo) = 0;
    /**
     * IO控制
     */
    virtual int IccIOCtrl(IOType type, int value) = 0;
    /**
     * cpu命令
     */
    virtual int ApduCommand(IOType type, int len, uint8_t cmd[], uint8_t cmd_out[]) = 0;
    /**
     * 寻卡
     */
    virtual int CardSearch(int timeout, SearchResult *result) = 0;
    /**
     * 停止寻卡
     */
    virtual int CardStopSearch() = 0;
    /**
     * 激活非存储卡
     */
    virtual int RfCardActive(RfCardInfo &cardInfo) = 0;
    /**
     * 非存储卡休眠
     */
    virtual int RfCardDormancy() = 0;
    /**
     * 扫描数据
     */
    virtual int ScanData(const DeviceConfig& config, ResultData &result) = 0;
};
} // namespace Finance
} // namespace SwanLink

#endif // SWANLINK_FINANCE_INNERKITS_ICCREADER_ADAPTOR_H_